//
//  AYMHomeBottomView.m
//  QuickCure
//
//  Created by 徐绩 on 16/5/4.
//  Copyright © 2016年 ayumi. All rights reserved.
//

#import "AYMHomeBottomView.h"
#import "AYMHomeBottomAboveView.h"
#import "AYMHomeBottomBelowView.h"

@implementation AYMHomeBottomView

-(instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}

-(void)layoutSubviews{

    [super layoutSubviews];

    [self lineViewWithFram:CGRectMake(0, self.frame.size.height *0.5, screenW, 1)];
    [self lineViewWithFram:CGRectMake(screenW / 3, 0, 1, self.frame.size.height)];
    [self lineViewWithFram:CGRectMake(screenW / 3 * 2, 0, 1, self.frame.size.height)];
    
    AYMHomeBottomBelowView *belowView = [[AYMHomeBottomBelowView alloc]init];
    AYMHomeBottomAboveView *aboveView = [[AYMHomeBottomAboveView alloc]init];
    [self addSubview:belowView];
    [self addSubview:aboveView];
    
    
    
    [belowView makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.bottom.equalTo(self);
        make.height.equalTo(self.frame.size.height * 0.5);
    }];
    [aboveView makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self);
        make.bottom.equalTo(belowView.top);
        make.height.equalTo(belowView);
    }];

}

-(UIView *)lineViewWithFram:(CGRect)frame{

    UIView *lineView = [[UIView alloc]initWithFrame:frame];
    [lineView setBackgroundColor:[UIColor lightGrayColor]];
    [self addSubview:lineView];
    return lineView;
}

-(void)setupUI{


}

@end
